<template>
  <div class="components-container">
    <el-dialog v-el-drag-dialog :visible.sync="dialogVisible" :title="title">
      <div>
        <slot />
      </div>
    </el-dialog>
  </div>
</template>

<script>
import elDragDialog from '@/directive/el-drag-dialog'; // base on element-ui

export default {
  name: 'DragDialogDemo',
  directives: { elDragDialog },
  props: ['title'],
  data() {
    return {
      dialogVisible: false,
    };
  },
  mounted() {
    // this.dialogShow = this.dialogVisible;
  },
  methods: {
    showDialog(){
      this.dialogVisible = true;
    },
    hideDialog(){
      this.dialogVisible = false;
    },
    // handleDrag(){
    //   this.dialogVisible = false;
    // },
  },
};
</script>
